package bingo.codeweaver.view;

import java.util.HashMap;
import java.util.Map;


/**
 * 
 * May 28, 2009 7:46:48 AM
 * Author:yangdongyu(yangdy@bingosoft.net)
 * ReadMe:
 * ChangeLog:
 */
public class WebAppContext {

	private static String contextPath;
	private static String scriptPath;
	private static String themePath;
	private static String imagePath;
	private static Map<String,String> contextMap = new HashMap<String, String>();

	private WebAppContext(){

	}
	
	public static Map<String,String> getWebAppContext(){
		if(contextMap.isEmpty()){
			contextMap.put("contextPath", contextPath);
			contextMap.put("scriptPath", scriptPath);
			contextMap.put("themePath", themePath);
			contextMap.put("imagePath", imagePath);
		}
		return contextMap;
	}

	public static void setContextPath(String contextPath) {
		WebAppContext.contextPath = contextPath;
	}

	public static void setScriptPath(String scriptPath) {
		WebAppContext.scriptPath = scriptPath;
	}

	public static void setThemePath(String themePath) {
		WebAppContext.themePath = themePath;
	}

	public static void setImagePath(String imagePath) {
		WebAppContext.imagePath = imagePath;
	}



}